package com.xinqi.modules.course.course.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.annotations.Describe;
import com.xinqi.common.base.enums.BaseEnum;
import lombok.Getter;

/**
 * @author wenjie
 * @date 2023/3/7  11:09
 */

@Describe("课程/班级名称是否可编辑")
public enum NameEditableEnum implements BaseEnum {
    NOT_EDITABLE("NOT_EDITABLE", "不可编辑"),

    EDITABLE("EDITABLE", "可编辑");

    @Getter(onMethod_ = {@JsonValue})
    private final String code;

    @Getter
    private final String describe;

    NameEditableEnum(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static NameEditableEnum of(String code) {
        return BaseEnum.of(NameEditableEnum.class, code);
    }

}
